#pragma once

#include <maya/MPxFileTranslator.h>
#include "ColladaFileWriter.h"
#include "ColladaExporterOptions.h"

// Represents the COLLADA exporter object.
class ColladaExporter : public MPxFileTranslator
{
public:
	// Constructor/Destructor.
	ColladaExporter();
	virtual ~ColladaExporter();

	// Factory method.
	static void* creator();

	// Called by Maya on export.
	//		file: the name of the file to write.
	//		optionsString: a string representation of any file options.
	//		mode: the method used to write the file - save, export, or export active.
	virtual MStatus writer(const MFileObject& file, const MString& optionsString, FileAccessMode mode);

	// Called by Maya while it's executing the MPxFileTranslator constructor.
	// Used to determine if this translator provides a reader method.
	virtual bool haveReadMethod() const;
	// Called by Maya while it's executing the MPxFileTranslator constructor.
	// Used to determine if this translator provides a writer method.
	virtual bool haveWriteMethod() const;
	// Called by Maya whenever it needs to know the default extension of the exporter.
	virtual MString defaultExtension() const;
	// Called by Maya when a file selection dialog accesses a new directory. It will potentially be called once for every file in the directory.
	virtual MFileKind identifyFile(const MFileObject& fileName, const char* buffer, short size) const;
};
